<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, initial-scale=1.0, width=device-width"/>
    <meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
    <title>详情</title>
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../css/utilCss.css">
    <script type="text/javascript" src="../script/jquery.js"></script>
	<style>
	</style>
</head>

<body style="height:100%">
  <header class="lxb_div_head">
    <div class="mian">
        <div class="lxb_div_head_letf">
        </div>
        <div class="lxb_div_head_text">
            详情
        </div>
        <div class="lxb_div_head_rigth"></div>
    </div>
  </header>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript">
    apiready = function(){
      $('.lxb_div_head_letf').click(function() {
        api.closeWin();
      });

    var data = api.pageParam;
    console.log('.......获取到的参数..........'+data);
    console.log('.......获取到的参数..........'+JSON.stringify(data));
    data = data.name;
    console.log('.......获取到的参数..........'+data+'...keyword..'+data.keyword);
    // push-saveLongtime 时长充值 push-saveVip 交押金 push-outVip 退押金  push-saveCombo 套餐
    if(data.keyword === 'push-saveLongtime'){
    openFm('deposit_fram_timeMoney','./deposit_fram_timeMoney.html',data);
    }else if(data.keyword === 'push-saveVip'){
    openFm('deposit_fram_money','./deposit_fram_money.html',data);
    }else if(data.keyword === 'push-outVip'){
    openFm('deposit_fram_money','./deposit_fram_money.html',data);
    }else if (data.keyword === 'push-saveCombo'){
    openFm('deposit_fram_money','./deposit_fram_money.html',data);
    }else if(data.keyword === 'push-spendLongtime'){
    openFm('deposit_fram_time','./deposit_fram_time.html',data);
    }else if(data.keyword === 'push-gotoUrl'){
    openFm('deposit',data.gotoUrl,'');
    }else{
    openFm('deposit_fram_time','./deposit_fram_currency.html',data);
    }

  }

/**
 * 打开frame
 * @param{String} name - frame名
 * @param{String} url - frame的相对路径
 * @param{Number} type - frame的类型;0==已审核;1==未审核;
 */
function openFm(name, url, msg) {
    var frameheigh = getFrameY();
    console.log('...........' + frameheigh);
    api.openFrame({
        name: name,
        url: url,
        rect: {
            x: 0,
            y: frameheigh,
            w: api.winWidth,
            h: 'auto'
        },
        pageParam: {
            name: msg
        },
        useWKWebView:true
    });
}

function getFrameY(){
  var frameheigh = $api.dom('header').offsetHeight;
  var systemType = api.systemType;
  if(api.systemType === 'ios'){
      var systemVersion = api.systemVersion;
      if(parseFloat(systemVersion) >= 11.0){
        frameheigh = frameheigh + 20;
      }
      return frameheigh;
  }
  return frameheigh;
}

</script>
</html>
